Several FTBFS fixes for Hurd systems.
authorJordi Mallach <jordi@debian.org>
Sat, 1 Aug 2026 11:36:36 +0000 (13:36 +0200)
committerCesare Falco <c.falco@ubuntu.com>
Sat, 1 Aug 2026 11:36:36 +0000 (13:36 +0200)
Forwarded: no

Gbp-Pq: Name hurd.patch

makefile
scripts/genie.lua
scripts/src/osd/sdl.lua
src/osd/modules/file/posixfile.cpp
src/osd/modules/file/posixptty.cpp
src/osd/sdl/sdlprefix.h

index c34b7716bc36be23a7b8d7f0ff681e48ea4f5e95..21637dadf0c14eae86cde196d0aaef845eccbb5d 100644 (file)
--- a/makefile
+++ b/makefile
@@ -227,6 +227,8 @@ GENIEOS := bsd
 else ifeq ($(firstword $(filter GNU/kFreeBSD,$(UNAME))),GNU/kFreeBSD)
 OS := freebsd
 GENIEOS := freebsd
+else ifeq ($(firstword $(filter GNU,$(UNAME))),GNU)
+OS := gnu
 else ifeq ($(firstword $(filter NetBSD,$(UNAME))),NetBSD)
 OS := netbsd
 GENIEOS := freebsd
@@ -1306,6 +1308,16 @@ linux: generate $(PROJECTDIR)/$(MAKETYPE)-linux/Makefile
        $(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/$(MAKETYPE)-linux config=$(CONFIG) precompile
        $(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/$(MAKETYPE)-linux config=$(CONFIG)
 
+.PHONY: gnu_x86
+gnu_x86: generate $(PROJECTDIR)/$(MAKETYPE)-linux/Makefile
+       $(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/$(MAKETYPE)-linux config=$(CONFIG)32 precompile
+       $(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/$(MAKETYPE)-linux config=$(CONFIG)32
+
+.PHONY: gnu
+gnu: generate $(PROJECTDIR)/$(MAKETYPE)-linux/Makefile
+       $(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/$(MAKETYPE)-linux config=$(CONFIG) precompile
+       $(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/$(MAKETYPE)-linux config=$(CONFIG)
+
 #-------------------------------------------------
 # gmake-linux-clang
 #-------------------------------------------------
index fa4a5bb6fa1652843896eb9b6c5e4befba3651f1..b0e6047a5f3eb9e4897f3ed822be9bcfcfd3c1c3 100644 (file)
@@ -150,6 +150,7 @@ newoption {
                { "netbsd",        "NetBSD"                 },
                { "openbsd",       "OpenBSD"                },
                { "linux",         "Linux"                  },
+               { "gnu",           "GNU"                    },
                { "macosx",        "OSX"                    },
                { "windows",       "Windows"                },
                { "haiku",         "Haiku"                  },
index a53b7fe858fbb02ac1b424a9a3f40c11e74aaac3..ed0d419becd6c70d2662dd0896412237ac767e33 100644 (file)
@@ -221,6 +221,9 @@ if _OPTIONS["targetos"]=="windows" then
        SDLOS_TARGETOS      = "win32"
 elseif _OPTIONS["targetos"]=="macosx" then
        SDLOS_TARGETOS      = "macosx"
+elseif _OPTIONS["targetos"]=="gnu" then
+       SDL_NETWORK         = "taptun"
+       SYNC_IMPLEMENTATION = "tc"
 end
 
 if BASE_TARGETOS=="unix" then
index f5dc2e91f10f3c3927682cd3270bf0d4e04cba35..533fa8712044f2d78ed4760e13c95706a5e97ede 100644 (file)
 #define _DARWIN_C_SOURCE
 #endif
 
+#if defined(__GNU__)
+#ifndef PATH_MAX
+#define PATH_MAX 1024
+#endif
+#endif
+
 // MAME headers
 #include "posixfile.h"
 #include "osdcore.h"
index 6dd35574faf6c8c41dd9cfacf7e92a1ab7edc306..48f1860a22b22b807045235e2cb5dd22b7333416 100644 (file)
 #include <util.h>
 #elif defined(__linux__) || defined(__EMSCRIPTEN__)
 #include <pty.h>
+#elif defined(__GNU__)
+#include <pty.h>
+#include <termios.h>
 #elif defined(__HAIKU__)
 #include <bsd/pty.h>
 #endif
 
+#if defined(__GNU__)
+#ifndef PATH_MAX
+#define PATH_MAX 1024
+#endif
+#endif
 
 namespace {
 
index 13e6c260612f3bc76fa16512825cb6b618231cfd..86fe46ec37ff5fcb30c75f94986cc275ba1dde2b 100644 (file)
@@ -24,7 +24,7 @@
 
 #ifdef SDLMAME_UNIX
 
-#if defined(__linux__) || defined(__FreeBSD_kernel__)
+#if defined(__linux__) || defined(__GNU__) || defined(__FreeBSD_kernel__)
 #define SDLMAME_LINUX 1
 
 #elif defined(__FreeBSD__)